<h2>List All Subscribers With Overdue Loans</h2>
<hr/>
<p>The 'generate report' for subscribers with overdue loans and 'generate mail merge' for subscribers
 with overdue loans are detailed on this page. To list/generate a report for specific subscribers in arrears
   select the subscriber status type from the drop down field and enter a valid date in the 
  date field. Select option 'Generate report'. The Report includes the total number of results and the total pages for printing 
  can be determined during printing. This indicates the appropriate size of the report in pages
   to enable you to make adjustments before printing.<br />
   To generate a mail merge for subscribers with overdue loans follow the same procedures above and select
   the option 'generate mail merge'.<br />
   This report is also used for listing overdue loans for shelf checking before mailing overdue letters.
 
</p>
<center>
<div class="errorval"><?php echo validation_errors(); ?>
<?php echo $error; ?></div>
<table>
<?php $parameters = array('target' => '_blank'); ?>
<?php echo form_open('admin/reports_management/overdueLoans/', $parameters); ?>
<tr>
	<th align="right">For Location:</th>
	<?php
	$options = array();
	
	foreach ($locations as $location)
		$options[$location->location_id] = $location->location_name;
	
	?>
	<td colspan=2><?php echo form_dropdown('location_id', $options); ?></td>
</tr>
<tr>
	<th align="right">As Of Date:</th>
	<td colspan=2><?php echo form_input('due_date', date('Y-m-d')); ?></td>
</tr>
<tr>
	<th align="right" class="tablehead">Actions</th>
	<td><?php echo form_submit('generate_report', 'Generate Report'); ?></td>
	<td><?php echo form_submit('generate_mail_merge', 'Generate Mail Merge'); ?></td>
</tr>
<?php echo form_close(); ?>
</table>
</center>

<script type="text/javascript">
$(document).ready(function() {
		$( '[name="due_date"]' ).datepicker({ dateFormat: 'yy-mm-dd', changeMonth: true, changeYear: true });
});
</script>